package com.iplay.thezen.composite;

import java.util.ArrayList;

/**
 * @author dangwu
 * @since 2021/9/23 3:35 下午
 */
public class Composite extends Component{
    private ArrayList<Component> componentArrayList = new ArrayList<>();
    public void add(Component component){
        this.componentArrayList.add(component);
    }
    public void remove(Component component){
        this.componentArrayList.remove(component);
    }

    public ArrayList<Component> getChildren(){
        return this.componentArrayList;
    }

}
